﻿using Codemonk.Pease.Common;
using System;

namespace Codemonk.Pease.Server
{
    /// <summary>
    /// 函数执行器
    /// </summary>
    /// <typeparam name="T">能够解析的数据类型</typeparam>
    public interface IMethodInvoker<C, T>
    {
        /// <summary>
        /// 执行函数
        /// </summary>
        /// <param name="context">上下文</param>
        /// <param name="monitor">监视器</param>
        /// <param name="decorator">装饰器</param>
        /// <param name="activator">接口激活器</param>
        /// <param name="serializater">序列化器</param>
        /// <param name="request">请求</param>
        /// <param name="back">返回</param>
        void Invoke(C context, IAspectMonitor<C> monitor, IObjectDecorator<C> decorator, IInterfaceActivator activator, ISerializater<T> serializater, RequestAgreement<T> request, Action<ResponseAgreement<T>> back);
    }
}
